package com.ruoyi.project.loan.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.framework.aspectj.lang.annotation.Excel;
import com.ruoyi.framework.web.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

/**
 * 还款计划对象 repayment_plan
 *
 * @author ruoyi
 * @date 2025-11-11
 */
public class RepaymentPlan extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * $column.columnComment
     */
    private Long planId;

    /**
     * 贷款申请
     */
    @Excel(name = "贷款申请" )
    private Long applicationId;

    /**
     * 应还日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd" )
    @Excel(name = "应还日期", width = 30, dateFormat = "yyyy-MM-dd" )
    private Date dueDate;

    /**
     * 应还本金
     */
    @Excel(name = "应还本金" )
    private Long principal;

    /**
     * 应还利息
     */
    @Excel(name = "应还利息" )
    private Long interest;

    /**
     * 状态
     */
    @Excel(name = "状态" )
    private String status;

    public Long getPlanId() {
        return planId;
    }

    public void setPlanId(Long planId) {
        this.planId = planId;
    }

    public Long getApplicationId() {
        return applicationId;
    }

    public void setApplicationId(Long applicationId) {
        this.applicationId = applicationId;
    }

    public Date getDueDate() {
        return dueDate;
    }

    public void setDueDate(Date dueDate) {
        this.dueDate = dueDate;
    }

    public Long getPrincipal() {
        return principal;
    }

    public void setPrincipal(Long principal) {
        this.principal = principal;
    }

    public Long getInterest() {
        return interest;
    }

    public void setInterest(Long interest) {
        this.interest = interest;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("planId", getPlanId())
                .append("applicationId", getApplicationId())
                .append("dueDate", getDueDate())
                .append("principal", getPrincipal())
                .append("interest", getInterest())
                .append("status", getStatus())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .append("remark", getRemark())
                .toString();
    }
}
